package com.njuse_czf.kg.web.service.impl.handler;

public class QuestionCtx {
    /**
     * 记录当前涉及的领域
     */
    private String domain;

    /**
     * 记录当前的handler
     */
    private AbstractQuestionHandler currentHandler;

    /**
     * 记录得到的回答
     */
    private StringBuilder answer = new StringBuilder();

    public String getDomain() {
        return domain;
    }

    /**
     * 设置domain.
     *
     * @param domain domain
     */
    public void setDomain(String domain) {
        this.domain = domain;
    }

    public AbstractQuestionHandler getCurrentHandler() {
        return currentHandler;
    }

    /**
     * 设置currentHandler.
     *
     * @param currentHandler currentHandler
     */
    public void setCurrentHandler(AbstractQuestionHandler currentHandler) {
        this.currentHandler = currentHandler;
    }

    public String getAnswer() {
        return answer.toString();
    }

    /**
     * 添加answer
     *
     * @param answer answer
     */
    public void addAnswer(String answer){
        this.answer.append(answer);
    }
}
